import { IPSSysPanelModel } from './ipssys-panel-model';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSSysPanelModelImpl extends PSModelObjectImpl implements IPSSysPanelModel {
  get codeName(): string {
    return this.M.codeName;
  }

  get dataType(): 'OBJECT' | 'OBJECTARRAY' | 'STRING' | 'STRINGARRAY' | 'INT' | 'INTARRAY' | 'NUMBER' | 'NUMBERARRAY' | 'BOOL' {
    return this.M.dataType;
  }

  get dynaModelFilePath(): string {
    return this.M.dynaModelFilePath;
  }

  get memo(): string {
    return this.M.memo;
  }

  get name(): string {
    return this.M.name;
  }

  get type(): 'PANELMODEL' | 'VIEWMODEL' | 'CTRLMODEL' {
    return this.M.type;
  }

  get userCat(): string {
    return this.M.userCat;
  }

  get userTag(): string {
    return this.M.userTag;
  }

  get userTag2(): string {
    return this.M.userTag2;
  }

  get userTag3(): string {
    return this.M.userTag3;
  }

  get userTag4(): string {
    return this.M.userTag4;
  }

  get ctrlModel(): boolean {
    return this.M.ctrlModel != null ? this.M.ctrlModel : false;
  }

  get panelModel(): boolean {
    return this.M.panelModel != null ? this.M.panelModel : false;
  }

  get viewModel(): boolean {
    return this.M.viewModel != null ? this.M.viewModel : false;
  }

  get cls(): string {
    return 'PSSysPanelModelImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'control.panel.IPSPanelModel' || cls == 'control.panel.IPSPanelObject' || cls == 'control.panel.IPSSysPanelModel') return true;
    return super.instanceof(cls);
  }
}
